package cn.hl.hm.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import cn.hl.hm.entity.backstage.BackStageUserRole;

public interface BackStageUserRoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(BackStageUserRole record);

    int insertSelective(BackStageUserRole record);

    BackStageUserRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(BackStageUserRole record);

    int updateByPrimaryKey(BackStageUserRole record);
    
    @Select("select id as id from t_backstage_user_role  where user_id =#{userId} and role_id = #{roleId}")
    List<BackStageUserRole> selectByIds(@Param("userId")Integer userId,@Param("roleId")Integer roleId);
    
    @Select("select id as id,user_id as userId,role_id as roleId from t_backstage_user_role")
    List<BackStageUserRole> selectAllUserRoles();

}